body {
    margin: 0;
    padding: 20px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.inventory-logo {
    font-size: 3em;
    margin-bottom: 10px;
    animation: swing 2s infinite;
}

@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
}

.title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-style: italic;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
}

.user-avatar {
    margin-right: 20px;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #ff6b6b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-details {
    flex: 1;
}

.username {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.user-level {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.user-wealth {
    display: flex;
    gap: 20px;
}

.wealth-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wealth-icon {
    font-size: 1.2em;
}

.wealth-amount {
    font-weight: 600;
    color: #2c3e50;
}

.inventory-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #e74c3c;
}

.stat-label {
    font-size: 0.9em;
    color: #7f8c8d;
}

.stat-divider {
    font-size: 1.5em;
    color: #bdc3c7;
    font-weight: bold;
}

.inventory-controls {
    padding: 25px 30px;
    background: white;
    border-bottom: 1px solid #ecf0f1;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    background: #ecf0f1;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    background: #d5dbdb;
}

.filter-tab.active {
    background: #e74c3c;
    color: white;
}

.sort-section {
    flex-shrink: 0;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 1em;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    border-color: #e74c3c;
}

.search-section {
    flex: 1;
    min-width: 200px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    flex: 1;
    padding: 10px 40px 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #e74c3c;
}

.search-icon {
    position: absolute;
    right: 12px;
    color: #7f8c8d;
    pointer-events: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.organize-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.organize-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
}

.expand-btn {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.expand-btn:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
}

.sell-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.sell-btn:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 8px;
    padding: 30px;
    background: #f8f9fa;
    justify-content: center;
}

.inventory-slot {
    width: 80px;
    height: 80px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ecf0f1;
}

.inventory-slot.empty {
    border-style: dashed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-slot.empty:hover {
    border-color: #95a5a6;
    background: #d5dbdb;
}

.empty-slot-icon {
    font-size: 2em;
    color: #bdc3c7;
    opacity: 0.5;
}

.inventory-slot.filled {
    background: white;
    border-color: #95a5a6;
}

.inventory-slot.filled:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 稀有度边框颜色 */
.inventory-slot.common {
    border-color: #95a5a6;
}

.inventory-slot.uncommon {
    border-color: #27ae60;
}

.inventory-slot.rare {
    border-color: #3498db;
}

.inventory-slot.epic {
    border-color: #9b59b6;
}

.inventory-slot.legendary {
    border-color: #f39c12;
}

.inventory-slot.mythic {
    border-color: #e74c3c;
}

.item-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.item-icon {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enchant-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 215, 0, 0.3) 50%, transparent 70%);
    animation: enchant-shine 2s infinite;
}

@keyframes enchant-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.item-quantity {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

.item-level {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(243, 156, 18, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6em;
    font-weight: bold;
}

.item-rarity-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 8px;
    pointer-events: none;
}

.item-rarity-border.legendary {
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.6);
}

.item-rarity-border.mythic {
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

.item-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 15px;
    border-radius: 8px;
    min-width: 250px;
    max-width: 350px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

.inventory-slot:hover .item-tooltip {
    opacity: 1;
    visibility: visible;
}

.tooltip-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.tooltip-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.tooltip-name.common { color: #95a5a6; }
.tooltip-name.uncommon { color: #27ae60; }
.tooltip-name.rare { color: #3498db; }
.tooltip-name.epic { color: #9b59b6; }
.tooltip-name.legendary { color: #f39c12; }
.tooltip-name.mythic { color: #e74c3c; }

.tooltip-type {
    color: #bdc3c7;
    font-size: 0.9em;
}

.tooltip-description {
    color: #ecf0f1;
    line-height: 1.4;
    margin-bottom: 10px;
    font-style: italic;
}

.tooltip-stats {
    margin-bottom: 10px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.stat-name {
    color: #bdc3c7;
}

.stat-value.positive {
    color: #27ae60;
}

.stat-value.negative {
    color: #e74c3c;
}

.tooltip-effects {
    margin-bottom: 10px;
}

.effect-line {
    color: #f39c12;
    margin-bottom: 3px;
    font-size: 0.9em;
}

.tooltip-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    margin-top: 10px;
}

.tooltip-value {
    color: #f39c12;
    font-weight: 600;
    margin-bottom: 5px;
}

.tooltip-time {
    color: #95a5a6;
    font-size: 0.8em;
}

.tooltip-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tooltip-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 60px;
}

.use-btn {
    background: #27ae60;
    color: white;
}

.use-btn:hover {
    background: #229954;
}

.equip-btn {
    background: #3498db;
    color: white;
}

.equip-btn:hover {
    background: #2980b9;
}

.gift-btn {
    background: #e91e63;
    color: white;
}

.gift-btn:hover {
    background: #c2185b;
}

.sell-btn {
    background: #f39c12;
    color: white;
}

.sell-btn:hover {
    background: #e67e22;
}

.drop-btn {
    background: #e74c3c;
    color: white;
}

.drop-btn:hover {
    background: #c0392b;
}

.inventory-summary {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px;
    background: white;
}

.summary-section, .value-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.summary-title, .value-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.summary-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-icon {
    font-size: 1.5em;
}

.summary-number {
    font-size: 1.3em;
    font-weight: bold;
    color: #e74c3c;
}

.summary-label {
    font-size: 0.9em;
    color: #7f8c8d;
}

.total-value {
    font-size: 2em;
    font-weight: bold;
    color: #f39c12;
    margin-bottom: 15px;
    text-align: center;
}

.value-breakdown {
    space-y: 8px;
}

.value-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.value-item:last-child {
    border-bottom: none;
}

.value-label {
    color: #7f8c8d;
}

.value-amount {
    font-weight: 600;
    color: #2c3e50;
}

.quick-actions {
    padding: 30px;
    background: #f8f9fa;
}

.quick-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quick-btn:hover {
    border-color: #e74c3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.quick-text {
    font-weight: 600;
    color: #2c3e50;
}

.recent-activity {
    padding: 30px;
    background: white;
}

.activity-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #ecf0f1;
}

.activity-item:last-child {
    margin-bottom: 0;
}

.activity-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-text {
    color: #2c3e50;
    margin-bottom: 3px;
}

.activity-time {
    color: #7f8c8d;
    font-size: 0.8em;
}

.activity-item-icon {
    flex-shrink: 0;
}

.activity-item-icon img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
}

.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.footer-info {
    max-width: 600px;
    margin: 0 auto;
}

.info-text {
    font-size: 1.1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.update-time {
    font-size: 0.9em;
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .inventory-summary {
        grid-template-columns: 1fr;
    }
    
    .quick-buttons {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .user-info {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .user-wealth {
        justify-content: center;
    }
    
    .inventory-controls {
        padding: 20px;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, 70px);
        gap: 6px;
        padding: 20px;
    }
    
    .inventory-slot {
        width: 70px;
        height: 70px;
    }
    
    .summary-stats {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .quick-buttons {
        grid-template-columns: 1fr;
    }
    
    .item-tooltip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 90vw;
        max-height: 80vh;
        overflow-y: auto;
    }
}